package de.zefania.api.impl;

import java.util.HashMap;

import de.zefania.api.ModulInformation;

public class BibleInformationImpl implements ModulInformation {	
	private String title;
	private String[] creator;
	private String[] description;
	private String[] publisher;
	private String subject;
	private String[] contributors;
	private String date;
	private String type;
	private String format;
	private String identifier;
	private String source;
	private String language;
	private String coverage;
	private String rights;
	
	
	private String modulId;
	
	public BibleInformationImpl(final HashMap<String, String[]> information, final String modulId) {
		this.modulId = modulId;
		
		
		title = (information.containsKey("title")) 				? information.get("title")[0] : "";
		creator = (information.containsKey("creator")) 			? information.get("creator") : new String[0];
		description = (information.containsKey("description")) 	? information.get("description") : new String[0];
		publisher = (information.containsKey("publisher")) 		? information.get("publisher") : new String[0];
		subject = (information.containsKey("subject")) 			? information.get("subject")[0] : "";
		contributors = (information.containsKey("contributors"))	? information.get("contributors") : new String[0];
		date = (information.containsKey("date")) 				? information.get("date")[0] : "";
		type = (information.containsKey("type")) 				? information.get("type")[0] : "";
		format = (information.containsKey("format")) 			? information.get("format")[0] : "";
		identifier = (information.containsKey("identifier")) 	? information.get("identifier")[0] : "";
		source = (information.containsKey("source")) 			? information.get("source")[0] : "";
		language = (information.containsKey("language")) 		? information.get("language")[0] : "";
		coverage = (information.containsKey("coverage")) 		? information.get("coverage")[0] : "";
		rights = (information.containsKey("rights")) 			? information.get("rights")[0] : "";	
	}

	@Override
	public final String getTitle() {		return title;	}
	@Override
	public final String[] getCreator() {		return creator;	}
	@Override
	public final String[] getDescription() {		return description;	}
	@Override
	public final String[] getPublisher() {		return publisher;	}
	@Override
	public final String getSubject() {		return subject;	}
	@Override
	public final String[] getContributors() {		return contributors;	}	
	@Override
	public final String getDate() {		return date;	}
	@Override
	public final String getType() {		return type;	}
	@Override
	public final String getFormat() {		return format;	}
	@Override
	public final String getIdentifier() {		return identifier;	}
	@Override
	public final String getSource() {		return source;	}
	@Override
	public final String getLanguage() {		return language;	}
	@Override
	public final String getCoverage() {		return coverage;	}
	@Override
	public final String getRights() {		return rights;	}

	@Override
	public final String getModulId() {				return modulId;	}
	
}
